package com.kahweh.android.ngphoto;

import android.app.Activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class NGPhoto extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    	boolean supRetVal = super.onCreateOptionsMenu(menu);

    	Resources res = getResources();
    	CharSequence[] seq = res.getTextArray(R.array.act_ngphoto_menu_item);
    	
    	for (int i=0; i<seq.length; i++) {
    		menu.add(Menu.NONE, i, Menu.NONE, seq[i]);
    		menu.getItem(i).setIcon(R.drawable.icon);
    	}

    	return supRetVal;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    	switch (item.getItemId()) {
    	case 0:
    		return true;
    	case 1:
    		return true;
    	}
    	return false;
    }
}